package net.lainiao.mycost.service.impl;

import net.lainiao.mycost.bean.MenuInfo;
import net.lainiao.mycost.dao.IMenuInfoDAO;
import net.lainiao.mycost.service.IMenuInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by Administrator on 2017/3/22.
 */
@Service
@Transactional
public class MenuInfoServiceImpl implements IMenuInfoService {

    @Autowired
    private IMenuInfoDAO menuInfoDAO;

    @Override
    public List<MenuInfo> list(MenuInfo info) {
        return menuInfoDAO.list(info);
    }

    @Override
    public MenuInfo getInfo(MenuInfo info) {
        return menuInfoDAO.getInfo(info);
    }

    @Override
    public void add(MenuInfo info) {
        menuInfoDAO.add(info);
    }

    @Override
    public void update(MenuInfo info) {
        menuInfoDAO.update(info);
    }

    @Override
    public void delete(MenuInfo info) {
        menuInfoDAO.delete(info);
    }

    @Override
    public List<MenuInfo> getMenuList(Integer parentMenuId) {
        return menuInfoDAO.getMenuList(parentMenuId);
    }
}
